//
//  CWCore.h
//  CWDevelop
//
//  Created by LittoCats on 7/7/14.
//  Copyright (c) 2014 Littocats. All rights reserved.
//

#ifndef CWDevelop_CWCore_h
#define CWDevelop_CWCore_h

#define DEBUG_ON 1


#if DEBUG_ON

#define CWLog(...) NSLog(__VA_ARGS__)
#else
#define CWLog(...)
#endif

//controller
#import "CWViewController.h"
#import "CWJavaScriptContext.h"

//CWView
#import "CWView.h"

//object Extenssion
#import "NSObject+CW.h"
#import "UIColor+CW.h"
#import "UIFont+CW.h"

//source
#import "CWFile.h"

#endif

NSDictionary *appInfo_CW();
CWJavaScriptContext *app_jsContext_CW();
NSString *appInfoScript();

#define CWBunleId appInfo_CW()[@"CFBundleIdentifier"]

#define CWAppBundleName [[appInfo_CW()[@"CFBundleIdentifier"] componentsSeparatedByString:@"."] lastObject]

#define CWAppVersion appInfo_CW()[@"CFBundleVersion"]

#define CWAppDisplayName appInfo_CW()[@"CFBundleDisplayName"]

#define kShareApplication [UIApplication sharedApplication]

#define kKeyWindow [UIApplication sharedApplication].keyWindow

#define ISIOS7ORLATER  ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0)